cody - HTMLify profile

cody
4270 Files
633419 Views
Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/79 - The Bet Game
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Bet</title>
<link rel="icon" href="money.png">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Bet</title>
<link rel="icon" href="money.png">
# A fun game where you can virtually bet!
alert('Do you want to play the game?');
var randomNum1 = Math.floor(Math.random()*6)+1; // generate 1 to 6 random numbers
var randomImg= "img"+ randomNum1 + ".jpg"; // img1.jpg-img6.jpg
var randomImgSource= "image/" + randomImg; // image/imag1.jpg- image/ima6.jpg
var image1 = document.querySelectorAll("img")[0];
image1.setAttribute("src", randomImgSource);
var randomNum1 = Math.floor(Math.random()*6)+1; // generate 1 to 6 random numbers
var randomImg= "img"+ randomNum1 + ".jpg"; // img1.jpg-img6.jpg
var randomImgSource= "image/" + randomImg; // image/imag1.jpg- image/ima6.jpg
var image1 = document.querySelectorAll("img")[0];
image1.setAttribute("src", randomImgSource);
h1 {
margin: 30px;
margin-bottom: 80px;
font-family: 'Lobster', cursive;
text-shadow: 5px 0 #232931;
font-size: 8rem;
color: #F05454;
}
margin: 30px;
margin-bottom: 80px;
font-family: 'Lobster', cursive;
text-shadow: 5px 0 #232931;
font-size: 8rem;
color: #F05454;
}